	<table>
		<thead>
			<tr>
				<th width="20"><?php echo form_checkbox(array('name' => 'action_to_all', 'class' => 'check-all')); ?></th>
				<th><?php echo lang('escort_withdrawal_id_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_withdrawal_user_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_withdrawal_date_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_withdrawal_status_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_withdrawal_money_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_withdrawal_payment_date_label'); ?></th>
				<th width="250"></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="10">
					<div class="inner"><?php $this->load->view('admin/partials/pagination'); ?></div>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php foreach ($withdrawals as $withdrawal) : ?>
				<tr>
					<td><?php echo form_checkbox('action_to[]', $withdrawal->id); ?></td>
					<td><?php echo $withdrawal->id ; ?></td>
					<td>
						<?php echo $withdrawal->user_username ; ?>
					</td>
					<td><?php echo format_date($withdrawal->created_date); ?></td>
					<td>
					<?php 
						if($withdrawal->status == 'no'){?>
					<?php
							if($withdrawal->created_date < time()){
								echo lang('escort_withdrawal_debt_label');
							}else{
								echo lang('escort_withdrawal_pending_label');
							}
					?>
					<?php 
						}else if($withdrawal->status == 'awaiting'){
							echo lang('escort_withdrawal_awaiting_label');
					?>
					<?php 
						}else{
							echo $withdrawal->status;
						}
					?>
					</td>
					<td><?php echo $withdrawal->money ; ?></td>
					
					<td>
					<?php if($withdrawal->paid_date){ ?>
					<?php echo format_date($withdrawal->paid_date); ?>
					<?php }?>
					</td>					
					<td>
						<?php echo anchor('admin/be_withdrawal/edit/' . $withdrawal->id, lang('global:edit'), 'class="btn orange edit"'); ?>
						<?php echo anchor('admin/be_withdrawal/delete/' . $withdrawal->id, lang('global:delete'), array('class'=>'confirm btn red delete')); ?>
						<?php
						if($withdrawal->status == 'no'){ 
						?>
						<?php echo anchor('admin/be_withdrawal/mark_as_paid/' . $withdrawal->id, lang('escort_withdrawal_mark_as_paid_label'), array('class'=>'btn orange edit')); ?>
						<?php
						} 
						?>
					</td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>